<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    var obj = {}
    Object.defineProperty(obj,'school',{
      configurable:true,  // 可以删除
      // writable:true,   // 可以修改
      enumerable:true,  // 可以被枚举
      
      get(){
        return '青学'

      }
      ,set(val){
      console.log(val);
      }
    })
    // delete obj.school
    // obj.school = '山吹'
    // for(var k in obj){
    //   console.log(obj[k]);
    // }
    obj.school = 100
  </script>
</body>
</html>